package com.spidemo;

import com.spidemo.spi.Car;
import org.apache.dubbo.common.extension.ExtensionLoader;

/**
 * @author chaird
 * @create 2023-07-24 22:58
 */
public class App {
  public static void main(String[] args) {

      //自适应扩展点、指定名称的扩展点、激活扩展点
//    ExtensionLoader.getExtensionLoader(xxx.class).getAdaptiveExtension();
//    ExtensionLoader.getExtensionLoader(xxx.class).getExtension(name);
//    ExtensionLoader.getExtensionLoader(xxx.class).getActivateExtension(url, key);

    ExtensionLoader<Car> extensionLoader = ExtensionLoader.getExtensionLoader(Car.class);

    Car car = extensionLoader.getExtension("red");
    car.say();

  }
}
